package com.feng.modules.demo.action;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.feng.modules.core.action.BaseAction;
import com.feng.modules.demo.service.ITestService;

public class TestAction extends BaseAction{
	Log log=LogFactory.getLog(this.getClass());
	private ITestService testService;
	
	public void setTestService(ITestService testService) {
		this.testService = testService;
	}

	private String[] bbb;
	
      	public String[] getBbb() {
		return bbb;
	}

	public void setBbb(String[] bbb) {
		this.bbb = bbb;
	}

		public String test(){
      		String aa=(String) this.getParametersToMap().get("aaa");
      		System.out.println("Test  Success------------------"+aa+"--------------------------------------------");
      		testService.test();
      		String username=(String)this.getParametersToMap().get("username");
      		String password=(String)this.getParametersToMap().get("password");
      		log.debug("-----------------------------------------------------------");
      		if(username.equals(password)){
      			System.out.println("login success--------------------------------------------");
      			return SUCCESS;
      		}else{
      			return ERROR;
      		}
      	}
}
